﻿using System;

using BizElements.BusinessLayer;

namespace BizElements.Web
{
    /// <summary>
    /// Provides data for <see cref="ISearchFilter.FilterCommand"/> event.
    /// </summary>
    public sealed class SearchFilterCommandEventArgs : EventArgs
    {
        #region SearchFilterCommandEventArgs.

        SearchFilterCommands commands;
        ISearchFilter filter;

        /// <summary>
        /// Initializes a new instance of the <b>SearchFilterCommandEventArgs</b> class.
        /// </summary>
        /// <param name="filter">Filter invoking or affected by the command.</param>
        /// <param name="commands">Actions that caused the event to be raised.</param>
        public SearchFilterCommandEventArgs(ISearchFilter filter, SearchFilterCommands commands)
        {
            this.filter = filter;
            this.commands = commands;
        }

        /// <summary>
        /// Gets the filter invoking or affected by the command.
        /// </summary>
        public ISearchFilter Filter
        {
            get { return this.filter; }
        }

        /// <summary>
        /// Gets actions that caused the event to be raised.
        /// </summary>
        public SearchFilterCommands Commands
        {
            get { return this.commands; }
        }

        #endregion
    }
}